import { getToken } from "@/utils/auth"

// 只存储token(给字符串就行)
const initialState = '' || getToken()

export const reducerLogin = (state = initialState, { type, payload }) => {

  switch (type) {
    case 'login/token':
      return payload
    case 'login/delToken':
      return ''

    default:
      return state
  }
}
